package org.example.pojo.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Order {
    private Integer id;
    private Long userid;
    private Long goodid;
    private String username;
    private String goodname;
    private int state;
    private int num;
    private double price;
    private LocalDateTime saletime;
    private int addressid;
    private String address;
    private String consignee;
    public void copysalelog(SaleLog saleLog) {
        addressid = saleLog.getAddressid();
        price = saleLog.getPrice();
        saletime = saleLog.getSaletime();
        address = saleLog.getAddress();
        consignee = saleLog.getConsignee();
        userid = saleLog.getUserid();
        goodid = saleLog.getGoodid();
        num = saleLog.getNum();
        username = saleLog.getUsername();
        goodname = saleLog.getGoodname();
    }
}
